﻿namespace PSatSimCom.RandomGenerators
{
    class DoubleRandom : IRandomize
    {
        private readonly double _lower;
        private readonly double _upper;

        public DoubleRandom(double lower, double upper)
        {
            _lower = lower;
            _upper = upper;
        }

        public string Get()
        {
            var result = _lower + (_upper - _lower) * RandomSingleton.Rand.NextDouble();
            return result.ToString("F10");
        }
    }
}
